#include<iostream>

using namespace std;

class Shape{
    protected:
        int width;
        int height;
    public:
        void setWidth(int w){
            width = w;
        }
        void setHeight(int h){
            height = h;
        }
};
//基类
class PaintCost{
    public:
        int getCost(int area){
        return (70 * area);
    }
};
//派生类
class Rectangle:public Shape,public PaintCost{
    public:
        int getArea(){
            return (width * height);
        };
};
int main()
{
    Rectangle Rect;

    Rect.setWidth(5);
    Rect.setHeight(7);

    cout<< "Total Area="<<Rect.getArea()<<endl;
    cout<< "Total Cost="<<Rect.getCost(Rect.getArea())<<endl;
    return 0;
}